
#ifndef SILK_MACROS_E907P_H
#define SILK_MACROS_E907P_H

#undef silk_SMULWB
static OPUS_INLINE opus_int32 silk_SMULWB_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_SMULWB\n\t"
      "smmwb %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_SMULWB(a32, b32) (silk_SMULWB_e907p(a32, b32))


#undef silk_SMLAWB
static OPUS_INLINE opus_int32 silk_SMLAWB_e907p(opus_int32 a, opus_int32 b, opus_int32 c)
{
  __asm__(
      "#silk_SMLAWB\n\t"
      "kmmawb %0, %1, %2\n\t"
      : "+r"(a)
      : "r"(b), "r"(c)
  );
  return a;
}
#define silk_SMLAWB(a32, b32, c32) (silk_SMLAWB_e907p(a32, b32, c32))


#undef silk_SMULWT
static OPUS_INLINE opus_int32 silk_SMULWT_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_SMULWT\n\t"
      "smmwt %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_SMULWT(a32, b32) (silk_SMULWT_e907p(a32, b32))


#undef silk_SMLAWT
static OPUS_INLINE opus_int32 silk_SMLAWT_e907p(opus_int32 a, opus_int32 b,
 opus_int32 c)
{
  __asm__(
      "#silk_SMLAWT\n\t"
      "kmmawt %0, %1, %2\n\t"
      : "+r"(a)
      : "r"(b), "r"(c)
  );
  return a;
}
#define silk_SMLAWT(a32, b32, c32) (silk_SMLAWT_e907p(a32, b32, c32))

#undef silk_SMULBB
static OPUS_INLINE opus_int32 silk_SMULBB_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_SMULBB\n\t"
      "smbb16 %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_SMULBB(a32, b32) (silk_SMULBB_e907p(a32, b32))


#undef silk_SMLABB
static OPUS_INLINE opus_int32 silk_SMLABB_e907p(opus_int32 a, opus_int32 b,
 opus_int32 c)
{
  __asm__(
      "#silk_SMLABB\n\t"
      "kmabb %0, %1, %2\n\t"
      : "+r"(a)
      : "r"(b), "r"(c)
  );
  return a;
}
#define silk_SMLABB(a32, b32, c32)  (silk_SMLABB_e907p(a32, b32, c32))

#undef silk_SMULBT
static OPUS_INLINE opus_int32 silk_SMULBT_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_SMULBT\n\t"
      "smbt16 %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_SMULBT(a32, b32) (silk_SMULBT_e907p(a32, b32))

#undef silk_SMLABT
static OPUS_INLINE opus_int32 silk_SMLABT_e907p(opus_int32 a, opus_int32 b,
 opus_int32 c)
{
  __asm__(
      "#silk_SMLABT\n\t"
      "kmabt %0, %1, %2\n\t"
      : "+r"(a)
      : "r"(b), "r"(c)
  );
  return a;
}
#define silk_SMLABT(a32, b32, c32) (silk_SMLABT_e907p(a32, b32, c32))

#undef silk_SMLAL
static OPUS_INLINE opus_int32 silk_SMLAL_e907p(opus_int64 a, opus_int32 b,
 opus_int32 c)
{
  __asm__(
      "#silk_SMLAL\n\t"
      "smar64 %0, %1, %2\n\t"
      : "+r"(a)
      : "r"(b), "r"(c)
  );
  return a;
}
#define silk_SMLAL(a64, b32, c32)  (silk_SMLAL_e907p(a64, b32, c32))

#undef silk_ADD_SAT32
static OPUS_INLINE opus_int32 silk_ADD_SAT32_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_ADD_SAT32\n\t"
      "kaddw %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_ADD_SAT32(a, b)   (silk_ADD_SAT32_e907p(a, b))

#undef silk_SUB_SAT32
static OPUS_INLINE opus_int32 silk_SUB_SAT32_e907p(opus_int32 a, opus_int32 b)
{
  opus_int32 __result;
  __asm__(
      "#silk_SUB_SAT32\n\t"
      "ksubw %0, %1, %2\n\t"
      : "=r"(__result)
      : "r"(a), "r"(b)
  );
  return __result;
}
#define silk_SUB_SAT32(a, b)   (silk_SUB_SAT32_e907p(a, b))
/*
static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16)
{
  opus_int32 __result;
  __asm__(
      "clz16 %0, %1\n\t"
      : "=r"(__result)
      : "r"(in16)
  );
  return __result;
}

static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32)
{
  opus_int32 __result;
  __asm__(
      "clz32 %0, %1\n\t"
      : "=r"(__result)
      : "r"(in32)
  );
  return __result;
}*/

#endif
